package com.iflytek.uc.service;

import java.util.List;
import java.util.Map;

import com.iflytek.uc.domain.Entity;

public interface EntityService {

	Entity getEntityByGuid(String guid);
	
	List<Entity> getEntitiesByProperty(String propertyName, Object propertyValue);
	
	void getRelatedEntities(Entity entity);
	
	void getRelatedEntities(List<Entity> entities);

	void getProperties(Entity entity);
	
	void getProperties(List<Entity> entities);
	
	List<Entity> getRootEntities(String entityTypeName);
	
	Entity createEntity(String entityTypeName, 
			String name, 
			String displayName, 
			int displayOrder, 
			Map<String, Object> properties, 
			List<Entity> parents, 
			List<Entity> children);

	void updateEntity(String guid,
			String name, 
			String displayName, 
			int displayOrder, 
			Map<String, Object> properties, 
			List<Entity> parents, 
			List<Entity> children);
	
	void deleteEntity(String guid);
}
